﻿namespace Babylon.Animations
{
    /// <summary>
    /// Base interface of all animations.
    /// </summary>
    public interface IAnimation
    {
        /// <summary>
        /// Get the animation state
        /// </summary>
        AnimationState AnimationState { get; }

        /// <summary>
        /// Start the animation
        /// </summary>
        /// <param name="currentTime">current global time in seconds</param>
        void Start(float currentTime);

        /// <summary>
        /// Pause the animation
        /// </summary>
        /// <param name="currentTime">current global time in seconds</param>
        void Pause(float currentTime);

        /// <summary>
        /// Resume the animation
        /// </summary>
        /// <param name="currentTime">current global time in seconds</param>
        void Resume(float currentTime);

        /// <summary>
        /// Stop the animation
        /// </summary>
        /// <param name="currentTime">current global time in seconds</param>
        void Stop(float currentTime);

        /// <summary>
        /// Update the animation values
        /// </summary>
        /// <param name="currentTime">current global time in seconds</param>
        void Update(float currentTime);

        /// <summary>
        /// get or set a value indicating if the anim should be repeated
        /// </summary>
        bool RepeatForever { get; set; }

        /// <summary>
        /// get or set a value indicating if the anim should be reversed
        /// </summary>
        bool AutoReverse { get; set; }
    }
}
